package com.wzh.dao;

import com.wzh.pojo.Po.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
@Mapper
public interface Userdao {

	@Update("update user set username=#{username},tel=#{tel},email=#{email} where id=#{id}")
	int updatbyid(User user);

	@Delete("delete from user where id=#{id}")
	int deonebyid(User user);

	@Insert("insert into user (id,username,tel,email) value (#{id},#{username},#{tel},#{email})")
	int addnew(User user);

	@Select("select * from user ")
	List<User> getAll();

	@Select("select * from user where id=#{id}")
	List<User> getbyid(Long id);
}
